using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System;

namespace KFGame.Modes
{

    [System.Serializable]
    public class KFSeralPortMode
    {
        /// <summary>
        /// 分组名
        /// </summary>
        public string modeName;

        /// <summary>
        /// 启用
        /// </summary>
        [SerializeField]
        [Tooltip("是否生效")]
        public bool enter = true;
        /// <summary>
        /// 名字
        /// </summary>
        [SerializeField]
        [Tooltip("记录名称")]
        public string name;


        /// <summary>
        /// com 接口名字
        /// </summary>
        [SerializeField]
        [Tooltip("com 接口名字")]
        public string comName = "com1";
        [SerializeField]
        [Tooltip("com 比特率")]
        public int baudRate = 9600;
        [SerializeField]
        [Tooltip("com 数据位")]
        public int dataBit = 8;
        [SerializeField]
        [Tooltip("com 流控制")]
        public int flowControl = 0;
        [SerializeField]
        [Tooltip("com 奇偶校验")]
        public int parity = 0;
        [SerializeField]
        [Tooltip("com 停止位")]
        public int stopBit = 0;
        [SerializeField]
        [Tooltip("验证接收数据方式")]
        public string formatType = "07";
        [SerializeField]
        [Tooltip("验证数据长度")]
        public int formatLangth = 18;
        [SerializeField]
        [Tooltip("验证数据的起始位")]
        public string formatStart = "AA";
        [SerializeField]
        [Tooltip("验证数据结束位")]
        public string formatEnd = "CD";
        [SerializeField]
        [Tooltip("数据长度位的位置")]
        public int formatSizeIndex = 1;
        [SerializeField]
        [Tooltip("数据真实性校验方法")]
        public string formatParity;
        [SerializeField]
        [Tooltip("发送数据时添加验证方式")]
        public string formatSendParity;
        /// <summary>
        /// 被注
        /// </summary>
        [SerializeField]
        [Tooltip("写下备注为了更好的理解")]
        public string des;

    }
}